package com.example.poemtest.Activity;

import android.app.Application;
import android.content.Context;

/**
 * created by JHT on 2024/1/19
 */
public class MyApplication extends Application {
    public static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        //获取Context
        context = getApplicationContext();

    }
    //创建一个静态方法，以便获取context对象
    public static Context getContext() {
        return context;
    }
}
